package com.jbm.jbmsupplier.util;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * Created by lyh on 2017-02-24.
 */
////@Entity
////@Table(name = "business", schema = "", catalog = "jbmcore")
////@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class BusinessEntity  extends ICtrl implements Serializable {
    private static final long serialVersionUID = 3341459982439307373L;
    private int busId;
    private Integer loginId;
    private String busName;  //店铺名称
    private String busAddr;  //店铺地址
    private String servicestyle; //服务方式
    private String sellscope;  //经营范围
    private String mFilepath;
    private Integer status=0;  //0待审 1 已审 2退回
    private Timestamp createDate;
    private byte[]  picByte;
    private BusAuditLogEntity auditLogEntity;
    public BusinessEntity(){}
    public BusinessEntity(String busName,String busAddr,String servicestyle,String sellscope){
       this.busName=busName;
        this.busAddr=busAddr;
        this.servicestyle=servicestyle;
        this.sellscope=sellscope;
    }
    public BusinessEntity(String method,String busName,String busAddr,String servicestyle,String sellerscope,String mFilepath,byte[] picbytes ,int status){
        this.method=method;
        this.busName=busName;
        this.busAddr=busAddr;
        this.servicestyle=servicestyle;
        this.sellscope=sellerscope;
        this.mFilepath=mFilepath;
        this.picByte=picbytes;
        this.status=status;
    }
    public BusinessEntity(String method,int busId,String busName,String busAddr,String servicestyle,String sellerscope,String mFilepath,byte[] picbytes,int status ){
       this.method=method;
        this.busId=busId;
        this.busName=busName;
        this.busAddr=busAddr;
        this.servicestyle=servicestyle;
        this.sellscope=sellerscope;
        this.mFilepath=mFilepath;
        this.picByte=picbytes;
        this.status=status;
    }
    public BusinessEntity(String method,int login_Id ){
        this.method=method;
      this.loginId=login_Id;
    }

    public BusinessEntity(boolean back,String  errorinfo ){
        this.back  =back;
        this.errorinfo=errorinfo;
    }
    ////@Id
    ////@Column(name = "bus_id")
    ////@GeneratedValue
    public int getBusId() {
        return busId;
    }

    public void setBusId(int busId) {
        this.busId = busId;
    }

    ////@Basic
    ////@Column(name = "login_id")
    public Integer getLoginId() {
        return loginId;
    }

    public void setLoginId(Integer loginId) {
        this.loginId = loginId;
    }

    ////@Basic
    ////@Column(name = "bus_name")
    public String getBusName() {
        return busName;
    }

    public void setBusName(String busName) {
        this.busName = busName;
    }

    ////@Basic
    ////@Column(name = "bus_addr")
    public String getBusAddr() {
        return busAddr;
    }

    public void setBusAddr(String busAddr) {
        this.busAddr = busAddr;
    }

    ////@Basic
    ////@Column(name = "servicestyle")
    public String getServicestyle() {
        return servicestyle;
    }

    public void setServicestyle(String servicestyle) {
        this.servicestyle = servicestyle;
    }

    ////@Basic
    ////@Column(name = "sellscope")
    public String getSellscope() {
        return sellscope;
    }

    public void setSellscope(String sellscope) {
        this.sellscope = sellscope;
    }


   ////@Basic
    ////@Column(name = "m_filepath")
    public String getmFilepath() {
        return mFilepath;
    }

    public void setmFilepath(String mFilepath) {
        this.mFilepath = mFilepath;
    }

    ////@Basic
    ////@Column(name = "status")
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    ////@Basic
    ////@Column(name = "create_date")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    ////@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        BusinessEntity that = (BusinessEntity) o;

        if (busId != that.busId) return false;
        if (busAddr != null ? !busAddr.equals(that.busAddr) : that.busAddr != null) return false;
        if (busName != null ? !busName.equals(that.busName) : that.busName != null) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (loginId != null ? !loginId.equals(that.loginId) : that.loginId != null) return false;
        if (mFilepath != null ? !mFilepath.equals(that.mFilepath) : that.mFilepath != null) return false;
        if (sellscope != null ? !sellscope.equals(that.sellscope) : that.sellscope != null) return false;
        if (servicestyle != null ? !servicestyle.equals(that.servicestyle) : that.servicestyle != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;

        return true;
    }

    ////@Override
    public int hashCode() {
        int result = busId;
        result = 31 * result + (loginId != null ? loginId.hashCode() : 0);
        result = 31 * result + (busName != null ? busName.hashCode() : 0);
        result = 31 * result + (busAddr != null ? busAddr.hashCode() : 0);
        result = 31 * result + (servicestyle != null ? servicestyle.hashCode() : 0);
        result = 31 * result + (sellscope != null ? sellscope.hashCode() : 0);
        result = 31 * result + (mFilepath != null ? mFilepath.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        return result;
    }
    ////@Transient
    public byte[] getPicByte() {
        return picByte;
    }

    public void setPicByte(byte[] picByte) {
        this.picByte = picByte;
    }

    ////@Transient
    public BusAuditLogEntity getAuditLogEntity() {
        return auditLogEntity;
    }

    public void setAuditLogEntity(BusAuditLogEntity auditLogEntity) {
        this.auditLogEntity = auditLogEntity;
    }
}
